home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Headers / Ocx96.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-05  |  13.6 KB  |  391 lines  |  [TEXT/????]

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * ocx96.h -     OLE Controls 96 definitions                                   *
  4. *                                                                             *
  5. *               OLE Version 2.0                                               *
  6. *                                                                             *
  7. *               Copyright (c) 1992-1996, Microsoft Corp. All rights reserved. *
  8. *                                                                             *
  9. \*****************************************************************************/
  10.  
  11. #ifndef _OCX96_H_
  12. #define _OCX96_H_
  13.  
  14. /****** OCX96 GUIDs *********************************************************/
  15.  
  16. #ifndef INITGUID
  17. #include "ocx96guid.h"
  18. #endif
  19.  
  20.  
  21. /////////////////////////////////////////////////////////////////////////////
  22. // Typedefs for interfaces
  23.  
  24. #ifdef __cplusplus
  25. interface IAdviseSinkEx;
  26. interface IOleInPlaceObjectWindowless;
  27. interface IOleInPlaceSiteEx;
  28. interface IOleInPlaceSiteWindowless;
  29. #else
  30. typedef interface IAdviseSinkEx IAdviseSinkEx;
  31. typedef interface IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless;
  32. typedef interface IOleInPlaceSiteEx IOleInPlaceSiteEx;
  33. typedef interface IOleInPlaceSiteWindowless IOleInPlaceSiteWindowless;
  34. #endif
  35. typedef IAdviseSinkEx * LPADVISESINKEX;
  36. typedef IOleInPlaceObjectWindowless * LPOLEINPLACEOBJECTWINDOWLESS;
  37. typedef IOleInPlaceSiteEx * LPOLEINPLACESITEEX;
  38. typedef IOleInPlaceSiteWindowless * LPOLEINPLACESITEWINDOWLESS;
  39.  
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42. // IAdviseSinkEx interface
  43.  
  44. #undef  INTERFACE
  45. #define INTERFACE IAdviseSinkEx
  46.  
  47. DECLARE_INTERFACE_(IAdviseSinkEx, IAdviseSink)
  48. {
  49.     BEGIN_INTERFACE
  50.     // *** IUnknown methods ***
  51.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  52.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  53.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  54.  
  55.     // *** IAdviseSink methods ***
  56.     STDMETHOD_(void,OnDataChange)(THIS_ FORMATETC * pFormatetc, STGMEDIUM * pStgmed) PURE;
  57.     STDMETHOD_(void,OnViewChange)(THIS_ unsigned long dwAspect, long lindex) PURE;
  58.     STDMETHOD_(void,OnRename)(THIS_ LPMONIKER pmk) PURE;
  59.     STDMETHOD_(void,OnSave)(THIS) PURE;
  60.     STDMETHOD_(void,OnClose)(THIS) PURE;
  61.  
  62.     // *** IAdviseSinkEx methods ***
  63.     STDMETHOD_(void,OnViewStatusChange)(THIS_ DWORD dwViewStatus) PURE;
  64. };
  65.  
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68. // IOleInPlaceObjectWindowless interface
  69.  
  70. #undef  INTERFACE
  71. #define INTERFACE   IOleInPlaceObjectWindowless
  72.  
  73. DECLARE_INTERFACE_(IOleInPlaceObjectWindowless, IOleInPlaceObject)
  74.     BEGIN_INTERFACE
  75.     // *** IUnknown methods ***
  76.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  77.     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  78.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  79.  
  80.     // *** IOleWindow methods ***
  81.     STDMETHOD(GetWindow) (THIS_ WindowPtr * ppWnd) PURE;
  82.     STDMETHOD(ContextSensitiveHelp) (THIS_ unsigned long fEnterMode) PURE;
  83.  
  84.     // *** IOleInPlaceObject methods ***
  85.     STDMETHOD(InPlaceDeactivate) (THIS) PURE;   
  86.     STDMETHOD(UIDeactivate) (THIS) PURE;
  87.     STDMETHOD(SetObjectRects) (THIS_ LPCRECT lprcPosRect, 
  88.                     RgnHandle clipRgn,        // cliping area within containing window
  89.                     RgnHandle frameRgn,        // entire structure rgn of containing window
  90.                     RgnHandle cliRgn        // union of all structure rgns of all container app windows    
  91.                     ) PURE;
  92.     STDMETHOD(ReactivateAndUndo) (THIS) PURE;   
  93.  
  94.     // *** IOleInPlaceObjectWindowless methods ***
  95.     STDMETHOD(OnEvent)(THIS_ EventRecord* pEvent, LRESULT *plResult) PURE;
  96.     STDMETHOD(GetDropTarget)(THIS_ LPDROPTARGET *ppDropTarget) PURE;
  97. };
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100. // ACTIVATEFLAGS enumeration
  101.  
  102. typedef enum _ACTIVATEFLAGS
  103. {
  104.     ACTIVATE_WINDOWLESS     = 1
  105. }   ACTIVATEFLAGS;
  106.  
  107. /////////////////////////////////////////////////////////////////////////////
  108. // IOleInPlaceSiteEx interface
  109.  
  110. #undef  INTERFACE
  111. #define INTERFACE IOleInPlaceSiteEx
  112.  
  113. DECLARE_INTERFACE_(IOleInPlaceSiteEx, IOleInPlaceSite)
  114. {
  115.     BEGIN_INTERFACE
  116.     // *** IUnknown methods ***
  117.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  118.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  119.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  120.  
  121.     // *** IOleWindow methods ***
  122.     STDMETHOD(GetWindow) (THIS_ WindowPtr * ppWnd) PURE;
  123.     STDMETHOD(ContextSensitiveHelp) (THIS_ unsigned long fEnterMode) PURE;
  124.  
  125.     // *** IOleInPlaceSite methods ***
  126.     STDMETHOD(CanInPlaceActivate) (THIS) PURE;
  127.     STDMETHOD(OnInPlaceActivate) (THIS) PURE;
  128.     STDMETHOD(OnUIActivate) (THIS) PURE;    
  129.     STDMETHOD(OnUIVisible) (THIS_ unsigned long fVisible) PURE;    // true if visibile
  130.  
  131.     STDMETHOD(GetObjectRects) (THIS_ 
  132.                     Rect * lprcPosRect,
  133.                 // server allocs, container fills, server frees
  134.                     RgnHandle clipRgn,        // defines vis rgn
  135.                     RgnHandle frameRgn,        // containing window strucRgn
  136.                     RgnHandle cliRgn        // all container app strucRgns
  137.                       ) PURE;
  138.     STDMETHOD(GetWindowContext) (THIS_ 
  139.                         LPLPOLEINPLACEFRAME lplpFrame,
  140.                         LPLPOLEINPLACEUIWINDOW lplpDoc,
  141.                         //WindowPtr    *ppWindow,
  142.                         Rect *lprcPosRect,
  143.                     // server allocs, container fills, server frees
  144.                         RgnHandle clipRgn,        // defines vis rgn
  145.                         RgnHandle frameRgn,        // containing window strucRgn
  146.                         RgnHandle cliRgn,        // all container app strucRgns
  147.                         LPOLEINPLACEFRAMEINFO lpFrameInfo) PURE;
  148.     STDMETHOD(Scroll) (THIS_ long scrollExtent) PURE;       
  149.     STDMETHOD(OnUIDeactivate) (THIS_ unsigned long fUndoable) PURE;      
  150.     STDMETHOD(OnInPlaceDeactivate) (THIS) PURE;
  151.     STDMETHOD(DiscardUndoState) (THIS) PURE;
  152.     STDMETHOD(DeactivateAndUndo) (THIS) PURE;
  153.     STDMETHOD(OnPosRectChange) (THIS_ LPCRECT lprcPosRect) PURE; 
  154.  
  155.     // *** IOleInPlaceSiteEx methods ***
  156.     STDMETHOD(OnInPlaceActivateEx)(THIS_ unsigned long *pfNoRedraw, DWORD dwFlags) PURE;
  157.     STDMETHOD(OnInPlaceDeactivateEx)(THIS_ unsigned long fNoRedraw) PURE;
  158.     STDMETHOD(RequestUIActivate)(THIS) PURE;
  159. };
  160.  
  161.  
  162. /////////////////////////////////////////////////////////////////////////////
  163. // IOleInPlaceSiteWindowless interface
  164.  
  165. #undef  INTERFACE
  166. #define INTERFACE IOleInPlaceSiteWindowless
  167.  
  168. DECLARE_INTERFACE_(IOleInPlaceSiteWindowless, IOleInPlaceSiteEx)
  169. {
  170.     BEGIN_INTERFACE
  171.     // *** IUnknown methods ***
  172.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  173.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  174.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  175.  
  176.     // *** IOleWindow methods ***
  177.     STDMETHOD(GetWindow) (THIS_ WindowPtr * ppWnd) PURE;
  178.     STDMETHOD(ContextSensitiveHelp) (THIS_ unsigned long fEnterMode) PURE;
  179.  
  180.     // *** IOleInPlaceSite methods ***
  181.     STDMETHOD(CanInPlaceActivate) (THIS) PURE;
  182.     STDMETHOD(OnInPlaceActivate) (THIS) PURE;
  183.     STDMETHOD(OnUIActivate) (THIS) PURE;    
  184.     STDMETHOD(OnUIVisible) (THIS_ unsigned long fVisible) PURE;    // true if visibile
  185.  
  186.     STDMETHOD(GetObjectRects) (THIS_ 
  187.                     Rect * lprcPosRect,
  188.                 // server allocs, container fills, server frees
  189.                     RgnHandle clipRgn,        // defines vis rgn
  190.                     RgnHandle frameRgn,        // containing window strucRgn
  191.                     RgnHandle cliRgn        // all container app strucRgns
  192.                       ) PURE;
  193.     STDMETHOD(GetWindowContext) (THIS_ 
  194.                         LPLPOLEINPLACEFRAME lplpFrame,
  195.                         LPLPOLEINPLACEUIWINDOW lplpDoc,
  196.                         //WindowPtr    *ppWindow,
  197.                         Rect *lprcPosRect,
  198.                     // server allocs, container fills, server frees
  199.                         RgnHandle clipRgn,        // defines vis rgn
  200.                         RgnHandle frameRgn,        // containing window strucRgn
  201.                         RgnHandle cliRgn,        // all container app strucRgns
  202.                         LPOLEINPLACEFRAMEINFO lpFrameInfo) PURE;
  203.     STDMETHOD(Scroll) (THIS_ long scrollExtent) PURE;       
  204.     STDMETHOD(OnUIDeactivate) (THIS_ unsigned long fUndoable) PURE;      
  205.     STDMETHOD(OnInPlaceDeactivate) (THIS) PURE;
  206.     STDMETHOD(DiscardUndoState) (THIS) PURE;
  207.     STDMETHOD(DeactivateAndUndo) (THIS) PURE;
  208.     STDMETHOD(OnPosRectChange) (THIS_ LPCRECT lprcPosRect) PURE; 
  209.     
  210.     // *** IOleInPlaceSiteEx methods ***
  211.     STDMETHOD(OnInPlaceActivateEx)(THIS_ unsigned long *pfNoRedraw, DWORD dwFlags) PURE;
  212.     STDMETHOD(OnInPlaceDeactivateEx)(THIS_ unsigned long fNoRedraw) PURE;
  213.     STDMETHOD(RequestUIActivate)(THIS) PURE;
  214.  
  215.     //  *** IOleInPlaceSiteWindowless methods ***
  216.     STDMETHOD(CanWindowlessActivate)(THIS) PURE;
  217.     STDMETHOD(GetCapture)(THIS) PURE;
  218.     STDMETHOD(SetCapture)(THIS_ unsigned long fCapture) PURE;
  219.     STDMETHOD(GetFocus)(THIS) PURE;
  220.     STDMETHOD(SetFocus)(THIS_ unsigned long fFocus) PURE;
  221.     STDMETHOD(AcquireGrafPort)(THIS_  LPCRECT prc, DWORD grfFlags, GrafPtr *pGrafPtr) PURE;
  222.     STDMETHOD(ReleaseGrafPort)(THIS_ GrafPtr pGrafPort) PURE;
  223.     STDMETHOD(InvalidateRect)(THIS_ LPCRECT prc, unsigned long fErase) PURE;
  224.     STDMETHOD(InvalidateRgn)(THIS_ RgnHandle hRgn, unsigned long fErase) PURE;
  225.     STDMETHOD(ScrollRect)(THIS_ int dx, int dy, LPCRECT prcScroll, LPCRECT prcClip) PURE;
  226.     STDMETHOD(AdjustRect)(THIS_ LPCRECT prc) PURE;
  227.     STDMETHOD(OnDefaultEvent)(THIS_ EventRecord* pEvent, LRESULT *plResult) PURE;
  228. };
  229.  
  230.  
  231. #if 0
  232.  
  233. /*
  234.  * Key State Masks for Mouse Messages
  235.  */
  236. #ifndef _WIN32
  237. #define MK_LBUTTON                  0x0001
  238. #define MK_RBUTTON                  0x0002
  239. #define MK_SHIFT                    0x0004
  240. #define MK_CONTROL                  0x0008
  241. #define MK_MBUTTON                  0x0010
  242. #define MK_COMMAND                  0x8000
  243. #define MK_OPTION                   0x4000
  244. #define MK_FGSWITCH                 0x2000
  245. #endif
  246.  
  247. /*
  248.  * Virtual Keys, Standard Set
  249.  */
  250. #ifndef _WIN32
  251. #define VK_LBUTTON        0x01
  252. #define VK_RBUTTON        0x02
  253. #define VK_CANCEL         0x03
  254. #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
  255.  
  256. #define VK_BACK           0x08
  257. #define VK_TAB            0x09
  258.  
  259. #define VK_CLEAR          0x0C
  260. #define VK_RETURN         0x0D
  261.  
  262. #define VK_SHIFT          0x10
  263. #define VK_CONTROL        0x11
  264. #define VK_MENU           0x12
  265. #define VK_PAUSE          0x13
  266. #define VK_CAPITAL        0x14
  267.  
  268. #define VK_ESCAPE         0x1B
  269.  
  270. #define VK_SPACE          0x20
  271. #define VK_PRIOR          0x21
  272. #define VK_NEXT           0x22
  273. #define VK_END            0x23
  274. #define VK_HOME           0x24
  275. #define VK_LEFT           0x25
  276. #define VK_UP             0x26
  277. #define VK_RIGHT          0x27
  278. #define VK_DOWN           0x28
  279. #define VK_SELECT         0x29
  280. #define VK_PRINT          0x2A
  281. #define VK_EXECUTE        0x2B
  282. #define VK_SNAPSHOT       0x2C
  283. #define VK_INSERT         0x2D
  284. #define VK_DELETE         0x2E
  285. #define VK_HELP           0x2F
  286.  
  287. /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
  288. /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
  289.  
  290. #define VK_LWIN           0x5B
  291. #define VK_RWIN           0x5C
  292. #define VK_APPS           0x5D
  293.  
  294. #define VK_NUMPAD0        0x60
  295. #define VK_NUMPAD1        0x61
  296. #define VK_NUMPAD2        0x62
  297. #define VK_NUMPAD3        0x63
  298. #define VK_NUMPAD4        0x64
  299. #define VK_NUMPAD5        0x65
  300. #define VK_NUMPAD6        0x66
  301. #define VK_NUMPAD7        0x67
  302. #define VK_NUMPAD8        0x68
  303. #define VK_NUMPAD9        0x69
  304. #define VK_MULTIPLY       0x6A
  305. #define VK_ADD            0x6B
  306. #define VK_SEPARATOR      0x6C
  307. #define VK_SUBTRACT       0x6D
  308. #define VK_DECIMAL        0x6E
  309. #define VK_DIVIDE         0x6F
  310. #define VK_F1             0x70
  311. #define VK_F2             0x71
  312. #define VK_F3             0x72
  313. #define VK_F4             0x73
  314. #define VK_F5             0x74
  315. #define VK_F6             0x75
  316. #define VK_F7             0x76
  317. #define VK_F8             0x77
  318. #define VK_F9             0x78
  319. #define VK_F10            0x79
  320. #define VK_F11            0x7A
  321. #define VK_F12            0x7B
  322. #define VK_F13            0x7C
  323. #define VK_F14            0x7D
  324. #define VK_F15            0x7E
  325. #define VK_F16            0x7F
  326. #define VK_F17            0x80
  327. #define VK_F18            0x81
  328. #define VK_F19            0x82
  329. #define VK_F20            0x83
  330. #define VK_F21            0x84
  331. #define VK_F22            0x85
  332. #define VK_F23            0x86
  333. #define VK_F24            0x87
  334.  
  335. #define VK_NUMLOCK        0x90
  336. #define VK_SCROLL         0x91
  337.  
  338. /*
  339.  * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  340.  * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  341.  * No other API or message will distinguish left and right keys in this way.
  342.  */
  343. #define VK_LSHIFT         0xA0
  344. #define VK_RSHIFT         0xA1
  345. #define VK_LCONTROL       0xA2
  346. #define VK_RCONTROL       0xA3
  347. #define VK_LMENU          0xA4
  348. #define VK_RMENU          0xA5
  349.  
  350. #define VK_PROCESSKEY     0xE5
  351.  
  352. #define VK_ATTN           0xF6
  353. #define VK_CRSEL          0xF7
  354. #define VK_EXSEL          0xF8
  355. #define VK_EREOF          0xF9
  356. #define VK_PLAY           0xFA
  357. #define VK_ZOOM           0xFB
  358. #define VK_NONAME         0xFC
  359. #define VK_PA1            0xFD
  360. #define VK_OEM_CLEAR      0xFE
  361. #endif
  362.  
  363. /*
  364.  * Window Messages
  365.  */
  366. #ifndef _WIN32
  367. #define WM_NULL                         0x0000
  368. #define WM_SETCURSOR                    0x0020
  369. #define WM_KEYFIRST                     0x0100
  370. #define WM_KEYDOWN                      0x0100
  371. #define WM_KEYUP                        0x0101
  372. #define WM_CHAR                         0x0102
  373. #define WM_DEADCHAR                     0x0103
  374. #define WM_SYSKEYDOWN                   0x0104
  375. #define WM_SYSKEYUP                     0x0105
  376. #define WM_SYSCHAR                      0x0106
  377. #define WM_SYSDEADCHAR                  0x0107
  378. #define WM_KEYLAST                      0x0108
  379. #define WM_MOUSEFIRST                   0x0200
  380. #define WM_MOUSEMOVE                    0x0200
  381. #define WM_LBUTTONDOWN                  0x0201
  382. #define WM_LBUTTONUP                    0x0202
  383. #define WM_LBUTTONDBLCLK                0x0203
  384. #define WM_MOUSELAST                    0x0209
  385. #endif
  386.  
  387. #endif
  388.  
  389. #endif // _OCX96_H_
  390.